<?php

include_once '../include/user.inc.php';
include_once '../model/user.say.class.php';
include_once '../shared/common.inc.php';

//userSay(uid,content,publisDate)
try {

	$uid = G('uid');
	$content = G('content');
	$now = new DateTime();
	$publishDate = $now->format('Y-m-d H:i:s');
	$say = new Say($uid,$content,$publishDate);

	$pub_result = UO::publishSay($say);
	
	$arrState = array('pubState'=>$pub_result);
	$jsonStr = json_encode($arrState);
	
	echo $jsonStr;
	

}catch (Exception $ex){
	echo json_encode(array('code'=>$ex->getCode(),'msg'=>$ex->getMessage()));
}